package com.yoyo.itravel.bean;

import java.io.Serializable;
import java.util.List;

/**
 * @Description 权限实体类
 *
 * @author HZX
 * @date 2020/5/10 23:09
 */
public class Permission implements Serializable {

    private String permissionId; // 权限id
    private String permissionName; // 权限名称
    private String url; // 权限的访问路径
    private String description; // 权限描述

    private String parentPermissionId; // 父权限id

    List<Permission> childPermissions; // 子权限集合

    public Permission() {
    }

    public Permission(String permissionId, String permissionName, String url, String description, String parentPermissionId, List<Permission> childPermissions) {
        this.permissionId = permissionId;
        this.permissionName = permissionName;
        this.url = url;
        this.description = description;
        this.parentPermissionId = parentPermissionId;
        this.childPermissions = childPermissions;
    }

    public String getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(String permissionId) {
        this.permissionId = permissionId;
    }

    public String getPermissionName() {
        return permissionName;
    }

    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getParentPermissionId() {
        return parentPermissionId;
    }

    public void setParentPermissionId(String parentPermissionId) {
        this.parentPermissionId = parentPermissionId;
    }

    public List<Permission> getChildPermissions() {
        return childPermissions;
    }

    public void setChildPermissions(List<Permission> childPermissions) {
        this.childPermissions = childPermissions;
    }

    @Override
    public String toString() {
        return "Permission{" +
                "permissionId='" + permissionId + '\'' +
                ", permissionName='" + permissionName + '\'' +
                ", url='" + url + '\'' +
                ", description='" + description + '\'' +
                ", parentPermissionId='" + parentPermissionId + '\'' +
                ", childPermissions=" + childPermissions +
                '}';
    }
}
